Remove unused netmask,network etc. These were used when we called ifconfig to
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 12 Dec 2005 11:15:29 +0000 (11:15 +0000)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Mon, 12 Dec 2005 11:15:29 +0000 (11:15 +0000)
set up the networking, but now that we use ip directly, we don't need them, and
they were in any case broken when the ip address was specified without a suffix.

This work is by James Dykman <dykman@us.ibm.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/examples/vif-nat

index 9ce79f04346ef02343995bf1996f41e1ffb7d714..f56234a7a1ea14404e373fd1db7d122219e2be74 100644 (file)
@@ -81,17 +81,6 @@ router_ip=$(routing_ip "$ip")
 
 # Split the given IP/bits pair.
 vif_ip=`echo ${ip} | awk -F/ '{print $1}'`
-bits=`echo ${ip} | awk -F/ '{print $2}'`
-
-# Convert $bits and $vif_ip to integers, mask appropriately to get a network
-# address, and convert them both to dotted quads.
-
-intmask=$(( (0xFFFFFFFF << (32 - $bits)) & 0xFFFFFFFF ))
-vif_int=$(( $(echo "((($vif_ip" | sed -e 's#\.#)\*256\+#g') ))
-
-netmask=$(dotted_quad $intmask)
-network=$(dotted_quad $(( $vif_int & $intmask )) )
-
 
 hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----')
 if [ "$vifid" != "1" ]